{extend name="base" /} {block name="body"}
<div class="layui-body">
	<!--tab标签-->
	<div class="layui-tab layui-tab-brief">
		<ul class="layui-tab-title">
			<li class="">
				<a href="{:url('system/help')}">帮助中心</a>
			</li>
			<li class="layui-this">编辑帮助</li>
		</ul>
		<div class="layui-tab-content">
			<div class="layui-tab-item layui-show">
				<form class="layui-form form-container" action="{:url('system/update')}" method="post">
					<div class="layui-form-item">
						<label class="layui-form-label">标题</label>
						<div class="layui-input-block">
							<input type="text" name="title" value="{$help.title}" required lay-verify="required" placeholder="请输入标题" class="layui-input">
						</div>
					</div>
					<div class="layui-form-item" >
						<label class="layui-form-label">内容</label>
						<div class="layui-input-block" style="z-index: 1">
							<script style="width:960px;height:600px;" id="content" name="content" type="text/plain">
								{if isset($help.content)}{$help.content|html_entity_decode}{/if}
							</script>
						</div>
					</div>
					<div class="layui-form-item">
						<div class="layui-input-block">
							<input type="hidden" name="id" value="{$help.id}">
							<button class="layui-btn" lay-submit lay-filter="*">更新</button>
							<button type="reset" class="layui-btn layui-btn-primary">重置</button>
						</div>
					</div>
				</form>
			</div>
		</div>
	</div>
</div>
{/block}
{block name="js"}
<script type="text/javascript" src="/public/static/js/image.zip.js"></script>
<script type="text/javascript" src="/public/ueditor/ueditor.config.js"></script>
<script type="text/javascript" src="/public/ueditor/ueditor.all.js"></script>
<script>
	var ue = UE.getEditor('content', {
        initialFrameHeight: 450,
		serverUrl: "{:url('admin/ueditor/index?cate=news')}"
	});
	// 定义全局JS变量
	var GV = {
		current_controller: "{$controller}/help"
	};
</script>
{/block}